<template>
	<view class="container">
    <view class="login-btn">
      <u-button class="btn" @click="toLogin" shape="circle" >去登录</u-button>
    </view>
	</view>
</template>

<script>
	import store from "../../store";

  export default {
		data() {
			return {
				href: 'https://uniapp.dcloud.io/component/README?id=uniui'
			}
		},
    mounted() {
      const token = store.getters['user/token'];
      if (token) {
        uni.navigateTo({
          url: "/pages/index/index"
        });
      }
    },
		methods: {
      toLogin(){
        uni.navigateTo({
          url: '/pages/login/index'
        })
      }
		}
	}
</script>

<style lang="scss" scoped>
	.container {
    position: relative;
    height: 100vh;
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
  .login-btn{
    position: fixed;
    bottom: 50px;
    left: 10%;
    width: 80%;
  }
  .btn{
    width: 100%;
  }
</style>
